﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SRV_Clothes_Issue.aspx.cs"
    MasterPageFile="~/MasterALSafa.Master" Inherits="School.Pages.Uniforms.SRV_Clothes_Issue" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <table align="right" dir="rtl">
            <tr>
                <td>
                    رقم الفاتوره
                </td>
                <td colspan="2">
                    <asp:TextBox Width="180" ID="txtNum" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    تاريخ بدايه البحث :
                </td>
                <td colspan="1">
                    <asp:TextBox Width="180" ID="datepicker13" runat="server"></asp:TextBox>
                    <asp:CalendarExtender ID="datepicker13_CalendarExtender" runat="server" Enabled="True"
                        TargetControlID="datepicker13">
                    </asp:CalendarExtender>
                </td>
                <td style="padding-right: 30px;">
                    تاريخ نهايه البحث :
                </td>
                <td colspan="1">
                    <asp:TextBox Width="180" ID="TextBox1" runat="server"></asp:TextBox>
                    <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" Enabled="True"
                        TargetControlID="TextBox1">
                    </asp:CalendarExtender>
                </td>
                <td colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label Text="الطالب" ID="lblName" runat="server"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownList1" DataTextField="Value" DataValueField="Key" Width="190"
                        runat="server" AutoPostBack="True" 
                        OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" 
                        AppendDataBoundItems="True">
                         <asp:ListItem Value="0">اختيار</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="padding-right: 230px; height: 40px; padding-top: 10px;">
                    <asp:Button ID="btnSearch" runat="server" Text="بحث" Width="60" CssClass="graybutton"
                        OnClick="btnSearch_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="color: Green">
                    <asp:Literal ID="lblResult" runat="server" Visible="False"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="padding-right:50px;">
                    <asp:GridView ID="gvdata" runat="server" Width="600px" DataKeyNames="Number,SizeId"
                        AutoGenerateColumns="False" CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter"
                        FooterStyle-CssClass="GridHeaderFooter" PagerStyle-CssClass="GridPager" AlternatingRowStyle-CssClass="GridItemAltername"
                        OnRowCommand="gvdata_RowCommand">
                        <AlternatingRowStyle CssClass="GridItemAltername"></AlternatingRowStyle>
                        <Columns>
                            <asp:BoundField DataField="Number" HeaderText="رقم الفاتوره" />
                            <asp:BoundField DataField="Paymnet_Order_Number" HeaderText="رقم امر الدفع" />
                            <asp:TemplateField HeaderText="تاريخ الفاتوره">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("Date")).ToShortDateString() %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="StudentName" HeaderText="اسم الطالب" />
                            <asp:BoundField DataField="ClotheName" HeaderText="الزى" />
                            <asp:BoundField DataField="SizeName" HeaderText="المقاس" />
                            <asp:BoundField DataField="VoucherValue" HeaderText="الكميه" />
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkDiscount" runat="server" CausesValidation="False" CommandName="GetDiscount"
                                        Text="الخصم"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="DoIssue"
                                        Text="صرف" Enabled='<%# Eval("IsIssue") %>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle CssClass="GridHeaderFooter"></FooterStyle>
                        <HeaderStyle CssClass="GridHeaderFooter"></HeaderStyle>
                        <PagerStyle CssClass="GridPager"></PagerStyle>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
